package com.hackerrank.contests.july13.challenges.gameofthrones2;

import java.util.Scanner;

public class Solution {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		char ch[] = in.next().toCharArray();
		int c[] = new int[26];
		for(char h : ch)
			c[h - 'a']++;
		
		// primes
		boolean isComp[] = new boolean[ch.length / 2];
		isComp[0] = true;
		for(int i = 2; i <= isComp.length; i++) {
			if(isComp[i - 1])
				continue;
			for(int j = 2 * i; j <= isComp.length; j += i)
				isComp[j - 1] = true;
		}
		
		// exponents of primes
		int[] pc = new int[ch.length / 2];
		for(int n = 2; n <= pc.length; n++)
			if(!isComp[n - 1])
				for(int cv = pc.length / n; cv > 0; cv /= n)
					pc[n - 1] += cv;
		for(int j = 0; j < c.length; j++)
			for(int n = 2; n <= c[j] / 2; n++)
				if(!isComp[n - 1])
					for(int cv = c[j] / 2 / n; cv > 0; cv /= n)
						pc[n - 1] -= cv;
		
		// product of exponents of primes
		long p = 1;
		for(int i = 1; i < pc.length; i++)
			for(int j = 0; j < pc[i]; j++)
				p = (p * (i + 1)) % 1000000007;
		System.out.println(p);
	}
}
